import request from '@/utils/request'

export default {
    // 分页条件查询标签列表
    getList(query, current = 1, size = 20) {
        return request({ // Promise
            url: `/article/article/search`,
            method: 'post',
            data: {...query, current, size }

        })
    },
    //id查询文章详情
    getById(id) {
        return request({ // Promise
            url: `/article/article/${id}`,
            method: 'get',
        })
    },
    getCategoryAndLabel() {
        return request({ // 获取正常的分裂和标签
            url: `/article/category/label/list`,
            method: 'get',
        })

    },
    auditSuccess(id) {
        return request({ // 获取正常的分裂和标签
            url: `/article/article/audit/success/${id}`,
            method: 'get',
        })
    },
    auditFail(id) {
        return request({ // 获取正常的分裂和标签
            url: `/article/article/audit/fail/${id}`,
            method: 'get',
        })
    },

    deleteById(id) {
        return request({ // 获取正常的分裂和标签
            url: `/article/article/${id}`,
            method: 'delete',
        })
    }

}